package recognyze.anthropometry;

import java.util.Collections;
import java.util.EnumMap;
import java.util.Map;
import java.util.Set;

/**
 *
 * @author maximr
 */
public class Anthropometry {
    private final Map<BasicHormion, Vector> myMap;

    public Anthropometry() {
        myMap = new EnumMap<BasicHormion, Vector>(BasicHormion.class);
    }

    public void addPoint(BasicHormion basicFacePoint, Vector p) {
        myMap.put(basicFacePoint, p);
    }

    public Vector getPoint(BasicHormion hormion) {
        return myMap.get(hormion);
    }

    public boolean isIsomorphic(Anthropometry a) {
        if (a == null) return false;
        if (myMap == null && a.myMap == null) return true;
        if(myMap == null || a.myMap == null) return false;
        return myMap.keySet().equals(a.myMap.keySet());
    }

    public Set<BasicHormion> getBasicHormions() {
        return Collections.unmodifiableSet(myMap.keySet());
    }
}
